package com.atung.parking.enums;

import lombok.Getter;

/**
 * @author Administrator
 */

@Getter
public enum ApplicableScopeType {

    WORKDAY("工作日"),
    WEEKEND_OR_HOLIDAY("周末节假日");

    private final String description;

    ApplicableScopeType(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public static String getDescriptionByName(String name) {
        for (ApplicableScopeType type : values()) {
            if (type.name().equals(name)) {
                return type.getDescription();
            }
        }
        return name;
    }

    @Override
    public String toString() {
        return description;
    }

}
